import requests

def main():
    url = "https://weibo.com/5836306077/Oc16cgBgK"

    ajax_url = "https://weibo.com/ajax/statuses/show?id=Oc16cgBgK&locale=zh-CN"
    comment_url = "https://weibo.com/ajax/statuses/buildComments?is_reload=1&id=5028641643956514&is_show_bulletin=3&is_mix=0&count=10&uid=5836306077&fetch_level=0&locale=zh-CN"
    user_page_url = "https://weibo.com/ajax/statuses/mymblog?uid=5836306077&page=1&feature=0"
    headers = {
        "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/125.0.0.0 Safari/537.36 Edg/125.0.0.0",
        "Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7",
        "Accept-Encoding": "gzip, deflate, br, zstd",
        "Accept-Language": "zh-CN,zh;q=0.9",
        "cookie": ""
    }
    response = requests.get(user_page_url,headers=headers)
    with open("index0.json","w",encoding="utf-8") as f:
            f.write(response.text)


if __name__ == "__main__":
    main()